<template>
	<view>
		<Ybtns :lineNum='lineNum' :data='btnList' @change='change'></Ybtns>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
				lineNum:4,//每行按钮个数
				btnList:[ //按钮信息
					{
						icon:'../../static/icon.png',//按钮图标 必填
						name:'按钮1',					//按钮标题 可不填
						id:1,						//其他任意自定义字段
					},
					{
						icon:'../../static/icon.png',
						name:'按钮2',
					},
					{
						icon:'../../static/icon.png',
						name:'按钮3',
					},
					{
						icon:'../../static/icon.png',
						name:'按钮4',
					},
					{
						icon:'../../static/icon.png',
						name:'按钮5',
					},
					{
						icon:'../../static/icon.png',
						name:'按钮6',
					},
					{
						icon:'../../static/icon.png',
						name:'按钮7',
					},
					{
						icon:'../../static/icon.png',
						name:'按钮8',
					},
					{
						icon:'../../static/icon.png',
						name:'按钮9',
					}
				],
			}
		},
		methods: {
			change(item){
				uni.showToast({
					title:`你点击了${item.name}`
				})
			},
		}
	}
</script>

<style>

</style>
